Skip to content

Conversation

vbvictor
Copy link
Contributor

@vbvictor vbvictor commented Sep 27, 2025

I'm trying to make pr-code-format.yml job run natively on ci-ubuntu-24.04 container.
As it appears, ci-ubuntu-24.04 already has latest clang-format, python3.12 installed, but python3.12 needs venv to work properly, and Ubuntu asks for python3-venv package to be installed to create a venv.

FYI I hacked it with --break-system-packages to test and clang-format job runs a lot faster https://github.com/llvm/llvm-project/actions/runs/18064896361/job/51406365488#logs (skipping 1min long clang-format installation). Just don't look at "Initialize containers" taking 6min, it usually takes 15-20sec

@llvmbot
Copy link
Member

llvmbot commented Sep 27, 2025

@llvm/pr-subscribers-github-workflow

Author: Baranov Victor (vbvictor)

Changes

I'm trying to make pr-clang-format.yml job run natively on ci-ubuntu-24.04 container.
As it appears, It already has clang-format-21.1.0, python3.12 installed, but python3.12 needs venv to work properly, and Ubuntu asks for this package to be installed in the system to create venv.

FYI I hacked test-run with --break-system-dependencies and clang-format job runs a lot faster https://github.com/llvm/llvm-project/actions/runs/18064896361/job/51406365488#logs (skipping 1min long clang-format installation). Just don't look at "Initialize containers" taking 6min, it usually takes 15-20sec


Full diff: https://github.com/llvm/llvm-project/pull/161024.diff

1 Files Affected:

  • (modified) .github/workflows/containers/github-action-ci/Dockerfile (+1)
diff --git a/.github/workflows/containers/github-action-ci/Dockerfile b/.github/workflows/containers/github-action-ci/Dockerfile
index 1d3f5f9c35d7f..dc0c9cabc7f01 100644
--- a/.github/workflows/containers/github-action-ci/Dockerfile
+++ b/.github/workflows/containers/github-action-ci/Dockerfile
@@ -62,6 +62,7 @@ RUN apt-get update && \
     # Having a symlink from python to python3 enables code sharing between
     # the Linux and Windows pipelines.
     python3-pip \
+    python3-venv \
     file \
     tzdata \
     python-is-python3 && \

Copy link
Contributor

@boomanaiden154 boomanaiden154 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

I think we want to eventually move to separate containers for the clang-format/premerge/clang-tidy workflows to trim down on space (and preinstall necessary python dependencies), but this seems fine for now, especially since the premerge container already has clang-format/clang-tidy.

@vbvictor
Copy link
Contributor Author

LGTM.

I think we want to eventually move to separate containers for the clang-format/premerge/clang-tidy workflows to trim down on space (and preinstall necessary python dependencies), but this seems fine for now, especially since the premerge container already has clang-format/clang-tidy.

It actually doesn't have clang-tidy installed. I tried building with clanf-tidy locally and got 1.1GB -> 1.2GB image size. So as the first Iteration I think the 100mb increase is ok

@vbvictor vbvictor merged commit 5a13c85 into llvm:main Sep 28, 2025
16 checks passed
@vbvictor vbvictor deleted the add-venv-to-githib-ci branch September 28, 2025 09:06
mahesh-attarde pushed a commit to mahesh-attarde/llvm-project that referenced this pull request Oct 3, 2025
I'm trying to make `pr-code-format.yml` job run natively on
`ci-ubuntu-24.04` container.
As it appears, `ci-ubuntu-24.04` already
[has](https://github.com/llvm/llvm-project/blob/41a2dfc0d77d9ad977d1d36358f979abb3a0928f/.github/workflows/containers/github-action-ci/Dockerfile#L35)
latest `clang-format`, `python3.12` installed, but `python3.12` needs
`venv` to work properly, and Ubuntu asks for `python3-venv` package to
be installed to create a venv.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants